package cn.edu.baiyunu.myapplication.data.repository

import cn.edu.baiyunu.myapplication.data.db.entity.PhotoRecord
import kotlinx.coroutines.flow.Flow

interface PhotoRepository {
    // 保存照片记录
    suspend fun savePhotoRecord(photoRecord: PhotoRecord): Long
    
    // 获取所有照片记录
    fun getAllPhotoRecords(): Flow<List<PhotoRecord>>
    
    // 按ID获取照片记录
    fun getPhotoRecordById(id: Long): Flow<PhotoRecord?>
    
    // 按规格类型获取照片记录
    fun getPhotoRecordsBySpecType(specType: String): Flow<List<PhotoRecord>>
    
    // 删除照片记录
    suspend fun deletePhotoRecord(id: Long)
    
    // 删除所有照片记录
    suspend fun deleteAllPhotoRecords()
    
    // 搜索照片记录
    fun searchPhotoRecords(query: String): Flow<List<PhotoRecord>>
    
    // 获取最近的照片记录
    fun getRecentPhotoRecords(limit: Int): Flow<List<PhotoRecord>>
    
    // 获取照片记录
    suspend fun getPhotoById(id: Long): PhotoRecord?
} 